package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * ImcUnityLoginRoleId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class ImcUnityLoginRoleId implements java.io.Serializable {

	// Fields

	private Integer unityId;
	private Integer uid;
	private String unityName;
	private String unityPass;
	private Integer unityMailCheckif;
	private Integer unityMailCount;
	private Integer unityIsUpdate;

	// Constructors

	/** default constructor */
	public ImcUnityLoginRoleId() {
	}

	/** full constructor */
	public ImcUnityLoginRoleId(Integer unityId, Integer uid, String unityName,
			String unityPass, Integer unityMailCheckif, Integer unityMailCount,
			Integer unityIsUpdate) {
		this.unityId = unityId;
		this.uid = uid;
		this.unityName = unityName;
		this.unityPass = unityPass;
		this.unityMailCheckif = unityMailCheckif;
		this.unityMailCount = unityMailCount;
		this.unityIsUpdate = unityIsUpdate;
	}

	// Property accessors

	@Column(name = "unity_id")
	public Integer getUnityId() {
		return this.unityId;
	}

	public void setUnityId(Integer unityId) {
		this.unityId = unityId;
	}

	@Column(name = "uid")
	public Integer getUid() {
		return this.uid;
	}

	public void setUid(Integer uid) {
		this.uid = uid;
	}

	@Column(name = "unity_name", length = 20)
	public String getUnityName() {
		return this.unityName;
	}

	public void setUnityName(String unityName) {
		this.unityName = unityName;
	}

	@Column(name = "unity_pass", length = 20)
	public String getUnityPass() {
		return this.unityPass;
	}

	public void setUnityPass(String unityPass) {
		this.unityPass = unityPass;
	}

	@Column(name = "unity_mail_checkif")
	public Integer getUnityMailCheckif() {
		return this.unityMailCheckif;
	}

	public void setUnityMailCheckif(Integer unityMailCheckif) {
		this.unityMailCheckif = unityMailCheckif;
	}

	@Column(name = "unity_mail_count")
	public Integer getUnityMailCount() {
		return this.unityMailCount;
	}

	public void setUnityMailCount(Integer unityMailCount) {
		this.unityMailCount = unityMailCount;
	}

	@Column(name = "unity_is_update")
	public Integer getUnityIsUpdate() {
		return this.unityIsUpdate;
	}

	public void setUnityIsUpdate(Integer unityIsUpdate) {
		this.unityIsUpdate = unityIsUpdate;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ImcUnityLoginRoleId))
			return false;
		ImcUnityLoginRoleId castOther = (ImcUnityLoginRoleId) other;

		return ((this.getUnityId() == castOther.getUnityId()) || (this
				.getUnityId() != null && castOther.getUnityId() != null && this
				.getUnityId().equals(castOther.getUnityId())))
				&& ((this.getUid() == castOther.getUid()) || (this.getUid() != null
						&& castOther.getUid() != null && this.getUid().equals(
						castOther.getUid())))
				&& ((this.getUnityName() == castOther.getUnityName()) || (this
						.getUnityName() != null
						&& castOther.getUnityName() != null && this
						.getUnityName().equals(castOther.getUnityName())))
				&& ((this.getUnityPass() == castOther.getUnityPass()) || (this
						.getUnityPass() != null
						&& castOther.getUnityPass() != null && this
						.getUnityPass().equals(castOther.getUnityPass())))
				&& ((this.getUnityMailCheckif() == castOther
						.getUnityMailCheckif()) || (this.getUnityMailCheckif() != null
						&& castOther.getUnityMailCheckif() != null && this
						.getUnityMailCheckif().equals(
								castOther.getUnityMailCheckif())))
				&& ((this.getUnityMailCount() == castOther.getUnityMailCount()) || (this
						.getUnityMailCount() != null
						&& castOther.getUnityMailCount() != null && this
						.getUnityMailCount().equals(
								castOther.getUnityMailCount())))
				&& ((this.getUnityIsUpdate() == castOther.getUnityIsUpdate()) || (this
						.getUnityIsUpdate() != null
						&& castOther.getUnityIsUpdate() != null && this
						.getUnityIsUpdate()
						.equals(castOther.getUnityIsUpdate())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getUnityId() == null ? 0 : this.getUnityId().hashCode());
		result = 37 * result
				+ (getUid() == null ? 0 : this.getUid().hashCode());
		result = 37 * result
				+ (getUnityName() == null ? 0 : this.getUnityName().hashCode());
		result = 37 * result
				+ (getUnityPass() == null ? 0 : this.getUnityPass().hashCode());
		result = 37
				* result
				+ (getUnityMailCheckif() == null ? 0 : this
						.getUnityMailCheckif().hashCode());
		result = 37
				* result
				+ (getUnityMailCount() == null ? 0 : this.getUnityMailCount()
						.hashCode());
		result = 37
				* result
				+ (getUnityIsUpdate() == null ? 0 : this.getUnityIsUpdate()
						.hashCode());
		return result;
	}

}